import request from '@/utils/request'

// 查询 列表
export function listProducts(query) {
  return request({
    url: '/system/products/list',
    method: 'get',
    params: query
  })
}

// 查询 详细
export function getProducts(advProductsId) {
  return request({
    url: '/system/products/' + advProductsId,
    method: 'get'
  })
}

// 新增 
export function addProducts(data) {
  return request({
    url: '/system/products',
    method: 'post',
    data: data
  })
}

// 修改 
export function updateProducts(data) {
  return request({
    url: '/system/products',
    method: 'put',
    data: data
  })
}

// 删除 
export function delProducts(advProductsId) {
  return request({
    url: '/system/products/' + advProductsId,
    method: 'delete'
  })
}
